#include "aic.h"
#include "core.h"

#define AIC_SMR1  (volatile unsigned int*)(AIC_BASE + 0x004)
#define AIC_IECR  (volatile unsigned int*)(AIC_BASE + 0x120)
#define AIC_EOICR (volatile unsigned int*)(AIC_BASE + 0x130)

//------------------------------------------------------------------------------
void init_aic()
{
  *AIC_IECR = (1 << 1);
  *AIC_SMR1 = (1 << 5);
}
//------------------------------------------------------------------------------
void signal_end_of_interrupt()
{
  *AIC_EOICR = 0xFFFFFFFF; // any value can be written
}
//------------------------------------------------------------------------------

